<template>
	<view>
		<view>
		    <view class="title" style="font-size: 17px;">营业执照</view>
		    <image :src="swichImage()" style="width: 100%;" >
		</view>
		<view v-for="(item,i) in zhengshuList" :key="item.id">
			<view class="title" style="font-size: 17px;">{{item.zhengshuName}}</view>
			<image :src="swichImages(item.zhengshuPicture)" style="width: 100%;" >
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				gsId:'',			//品牌公司ID
				yingyezhizhao:'',	//品牌公司营业执照
				zhengshuList:[],	//其他证书集合
			}
		},
		onLoad(opt) {
			this.gsId = opt.gsId;
			this.getZhengzhaoInfo()
		},
		methods: {
			getZhengzhaoInfo(){
				//查询营业执照
				this.$http.get('/xllmppGongsi/getGongsiById',{
					gsid: this.gsId
				}).then(res => {
					if(res.data.code==200){
						this.yingyezhizhao = res.data.data.yingyezhizhao;
					}else{
						this.$u.toast(res.data.msg)
					}
				})
				//查询其他资质证书
				this.$http.get('/xllmppGongsi/searchZizhiZhengShu',{
					gsId: this.gsId
				}).then(res => {
					if(res.data.code==200){
						if(res.data.data.length>0){
							this.zhengshuList = res.data.data
						}
					}else{
						this.$u.toast(res.data.msg)
					}
				})
			},
			//操作营业执照图片
			swichImage(){
				return this.host+'/image/yingyezhizhao/'+this.yingyezhizhao
			},
			swichImages(images){
				return this.host+'/image/zizhiZhengshu/'+images
			}
		}
	}
</script>

<style>
	.title{
		text-align: center;
	}
</style>
